package com.example.springboot.mapper;

import com.example.springboot.controller.request.BaseRequest;
import com.example.springboot.entity.Newspaper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface NewspaperMapper {

    List<Newspaper> list();

    List<Newspaper> listByCondition(BaseRequest baseRequest);

    void save(Newspaper newspaper);

    void deleteById(Integer id);

    Newspaper getById(Integer id);

    void update(Newspaper newspaper);

    Newspaper getByISBN(String newspaperIsbn);

    Integer deleteByIds(@Param("ids") List<Integer> ids);

    void updateByISBN(String newspaperIsbn);

}
